<div class="flexform">
    <?php
    $form = $this->beginWidget('CActiveForm', array(
        'id' => 'product-attribute-form',
        'enableAjaxValidation' => false
            ));
    ?>
    <div class="row">
        <?php echo $form->labelEx($model, 'name'); ?>
        <?php echo $form->textField($model, 'name', array('size' => 60)); ?>
        <?php echo $form->error($model, 'name', array('class' => 'form-msg-error-advanced')); ?>
    </div>
    <div class="row">
        <?php echo $form->labelEx($model, 'product_type'); ?>
        <?php echo $form->dropDownList($model, 'product_type', array('' => '')+$this->model_array); ?>
        <?php echo $form->error($model, 'product_type', array('class' => 'form-msg-error-advanced')); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'game_id'); ?>
        <?php echo $form->dropDownList($model, 'game_id', array('' => '') + ProductCategory::model()->getParentGame()); ?>
        <?php echo $form->error($model, 'game_id', array('class' => 'form-msg-error-advanced')); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'default_value'); ?>
        <?php echo $form->textField($model, 'default_value', array('size' => 60, 'maxlength' => 255)); ?>
        <?php echo $form->error($model, 'default_value', array('class' => 'form-msg-error-advanced')); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'input_type'); ?>
        <?php echo $form->dropDownList($model, 'input_type', $model->input_type_array); ?>
        <?php echo $form->error($model, 'input_type', array('class' => 'form-msg-error-advanced')); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'value_list'); ?>
        <?php echo $form->textArea($model, 'value_list', array('cols' => 100)); ?>
        <?php echo $form->error($model, 'value_list', array('class' => 'form-msg-error-advanced')); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'order_sort'); ?>
        <?php echo $form->textField($model, 'order_sort', array('size' => 11, 'maxlength' => 11)); ?>
        <?php echo $form->error($model, 'order_sort', array('class' => 'form-msg-error-advanced')); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'status'); ?>
        <?php echo $form->dropDownList($model, 'status', $model->status_array); ?>
        <?php echo $form->error($model, 'status', array('class' => 'form-msg-error-advanced')); ?>
    </div>

    <div class="action">
        <?php echo CHtml::submitButton($model->isNewRecord ? '创建' : '保存'); ?>
    </div>
    <?php $this->endWidget(); ?>
</div><!-- form -->
<div class="clear"></div>
